#ifndef EVENT_HPP
#define EVENT_HPP

#include <iostream>
#include <vector>

class Object;

class Event
{
private:
    Object* sender;

protected:
    typedef void (*Function)(Object*, ...);
    typedef std::vector<Function> EventVector;
    typedef EventVector::iterator EventIterator;
    EventVector functions;

protected:
    virtual void Call(Function function, Object* sender);
    void Attach(Function function);

public:
    Event();
    virtual ~Event();
    virtual void Notify(Object* sender);
    virtual void operator = (void(*function)(Object*));
};

#endif
